<!DOCTYPE html>

<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8" />

	<!-- Set the viewport width to device width for mobile -->
	<meta name="viewport" content="width=device-width" />
  
	<!-- Included CSS Files -->
	<link rel="stylesheet" href="<?php echo base_url(); ?>template/stylesheets/foundation.css">
	<link rel="stylesheet" href="<?php echo base_url(); ?>template/stylesheets/app.css">

	<!--[if lt IE 9]>
		<link rel="stylesheet" href="<?php echo base_url(); ?>template/stylesheets/ie.css">
	<![endif]-->


	<!-- IE Fix for HTML5 Tags -->
	<!--[if lt IE 9]>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

</head>
<body>

	<!-- container -->
	<div class="container">

		<div class="row">
			<div class="twelve columns header">
				<h2><?php echo anchor(base_url() . 'index.php/home', $title); ?></h2>
				<p class="slogan"><?php echo $slogan; ?></p>
			</div>
		</div>
		
		<div class="row">
			<div class="twelve columns banner">
				<div class="nine columns">
					<h4>Welkom Bob de Jong</h4>
					
				</div>	
				<div class="three columns profile">
					<h4>Mijn profiel: Bob de Jong</h4>
					<p>Rol: Planner</p>
					<p>Telefoon: 068746579</p>
				</div>
			</div>
		</div>	
		
		<div class="row">
		
			<div class="twelve columns errors">
			
				<div class="alert-box success">
					Hieronder kan je de overzichten van medewerkers en clienten zien, aanpassen, verwijderen.
					<a href="" class="close">&times;</a>
				</div>
				
			</div>	
		
		</div>
		
		<div class="row">
		
			<div class="twelve columns c-overzicht">
				<h4>Algemeen overzicht</h4>
				
				
					<dl class="nice contained tabs">
					   <?php if(isset($addClient)):?>
					    	<dd class="test"><a href="#nice1">Clienten overzicht</a></dd>
					    	<dd class="test"><a href="#nice2">Medewerkers overzicht</a></dd>
							<dd class="test"><a href="#nice3" class="active">Clienten toevoegen</a></dd>
					   <?php endif;?>
					   <?php if(isset($addMedewerker)):?>
					   		<dd class="test"><a href="#nice1">Clienten overzicht</a></dd>
					    	<dd class="test"><a href="#nice2" class="active">Medewerkers overzicht</a></dd>
							<dd class="test"><a href="#nice3" >Clienten toevoegen</a></dd>
					   <?php else:?>
					  		<dd class="test"><a href="#nice1" class="active">Clienten overzicht</a></dd>
					  		<dd class="test"><a href="#nice2">Medewerkers overzicht</a></dd>
							<dd class="test"><a href="#nice3">Clienten toevoegen</a></dd>
					  <?php endif;?>
					</dl>
					
					<ul class="nice tabs-content contained">
					  <?php if(isset($addClient)):?>
					  <li id="nice1Tab">
					  <?php elseif(isset($addMedewerker)):?>
					  <li id="nice1Tab">
					  <?php else: ?>
					  <li class="active" id="nice1Tab">
					  <?php endif;?>
					  		<table>
		  						<thead>
		  							<tr>
		  								<th>Voornaam</th>
		  								<th>Achternaam</th>
		  								<th>Leeftijd</th>
										<th>Vaste Tel nr</th>
										<th>Email</th>
										<th>Mobiel Tel nr</th>
										<th>Meer info</th>
										<th colspan="2" style="text-align: center;">Verwijder</th>
									</tr>
		  						</thead>				
		  					<?php if(isset($clienten)): ?>
								<?php foreach ($clienten as $row): ?>
									<tr>
										<td> <?php echo $row->voornaam; ?> </td>
										<td> <?php echo $row->achternaam; ?> </td>
										<td> <?php echo $row->leeftijd; ?> </td>
										<td> <?php echo $row->vaste_telefoon_nr; ?> </td>
										<td> <?php echo $row->email; ?> </td>
										<td> <?php echo $row->mobiel_telefoon_nr; ?> </td>
										<td> <?php echo anchor(base_url() . 'index.php/client/gotoClientProfile/id/' . $row->client_id, 'bekijk profiel'); ?> </td>
										<td style="text-align: center;"> <?php echo anchor(base_url() . 'index.php/client/deleteClient/id/'  . $row->client_id , '<img src="' . base_url() . '/template/images/verwijder.jpg" width="15" height="15">'); ?> </td>
										</tr>
								<?php endforeach;?>
						<?php endif;?>
		  			  </table>
					  </li>
					  <?php if(isset($addMedewerker)):?>
					  <li class="active" id="nice2Tab">
					  <?php else:?>
					   <li id="nice2Tab">
					  <?php endif; ?>
						<table>
		  						<thead>
		  							<tr>
		  								<th>Voornaam</th>
		  								<th>Achternaam</th>
		  								<th>Vaste Tel nr</th>
										<th>Email</th>
										<th>Mobiel Tel nr</th>
										<th>Meer info</th>
										<th colspan="2" style="text-align: center;">Verwijder</th>
									</tr>
		  						</thead>				  
					   <?php if(isset($medewerkers)): ?>
							<?php foreach ($medewerkers as $row): ?>
								<tr>
									<td> <?php echo $row->voornaam; ?></td>
									<td> <?php echo $row->achternaam; ?> </td>
									<td> <?php echo $row->vaste_telefoon_nr; ?> </td>
									<td> <?php echo $row->email; ?> </td>
									<td> <?php echo $row->mobiel_telefoon_nr; ?> </td>
									<td> <?php echo anchor(base_url() . 'index.php/medewerker/gotoMedewerkerProfile/id/' . $row->medewerker_id, 'bekijk profiel'); ?> </td>
									<td style="text-align: center;"> <?php echo anchor(base_url() . 'index.php/medewerker/deleteMedewerker/id/'  . $row->medewerker_id , '<img src="' . base_url() . '/template/images/verwijder.jpg" width="15" height="15">'); ?> </td>
								</tr>
							<?php endforeach;?>
						<?php endif;?>
						</table>
					  </li>
					  <?php if(isset($addClient)):?>
					  <li class="active" id="nice3Tab">
					  <?php else:?>
					  <li id="nice3Tab">
					  <?php endif;?>
					  		<tr id="adres">
									
												  		
					  <div class="row">
		  							<div class="seven columns">
		  								<?php echo form_open_multipart('client/newClient', 'class="nice"'); ?> 
										
										
										<div class="form-field error">
											<input type="text" name="straat" value="<?php echo set_value('straat'); ?>" placeholder="Straat" class="large input-text" />
											<?php if(form_error('straat')):?><small><?php echo form_error('straat'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="huisnummer" value="<?php echo set_value('huisnummer'); ?>" placeholder="Huisnummer" class="large input-text" />
											<?php if(form_error('huisnummer')):?><small><?php echo form_error('huisnummer'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="woonplaats" value="<?php echo set_value('woonplaats'); ?>" placeholder="Woonplaats" class="large input-text" />
											<?php if(form_error('woonplaats')):?><small><?php echo form_error('woonplaats'); ?></small> <?php endif;?>
										</div>
											
										<div class="form-field error">
											<input type="text" name="wijk" value="<?php echo set_value('wijk'); ?>" placeholder="Wijk" class="large input-text" />
											<?php if(form_error('wijk')):?><small><?php echo form_error('wijk'); ?></small> <?php endif;?>
										</div>
											
										<div class="form-field error">
											<input type="text" name="voornaam" value="<?php echo set_value('voornaam'); ?>" placeholder="Voornaam" class="large input-text" />
											<?php if(form_error('voornaam')):?><small><?php echo form_error('voornaam'); ?></small> <?php endif;?>
										</div>
											
										<div class="form-field error">
											<input type="text" name="achternaam" value="<?php echo set_value('achternaam'); ?>" placeholder="Achternaam" class="large input-text" />
											<?php if(form_error('achternaam')):?><small><?php echo form_error('achternaam'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="leeftijd" value="<?php echo set_value('leeftijd'); ?>" placeholder="Leeftijd" class="large input-text" />
											<?php if(form_error('leeftijd')):?><small><?php echo form_error('leeftijd'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="postcode" value="<?php echo set_value('postcode'); ?>" placeholder="Postcode" class="large input-text" />
											<?php if(form_error('postcode')):?><small><?php echo form_error('postcode'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="vaste_telefoon_nr" value="<?php echo set_value('vaste_telefoon_nr'); ?>" placeholder="Vaste telefoon nummer" class="large input-text" />
											<?php if(form_error('vaste_telefoon_nr')):?><small><?php echo form_error('vaste_telefoon_nr'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="email" value="<?php echo set_value('email'); ?>" placeholder="Email" class="large input-text" />
											<?php if(form_error('email')):?><small><?php echo form_error('email'); ?></small> <?php endif;?>
										</div>
										
										<div class="form-field error">
											<input type="text" name="mobiel_telefoon_nr" value="<?php echo set_value('mobiel_telefoon_nr'); ?>" placeholder="Mobiel telefoon nummer" class="large input-text" />
											<?php if(form_error('mobiel_telefoon_nr')):?><small><?php echo form_error('mobiel_telefoon_nr'); ?></small> <?php endif;?>
										</div>
										
								<?php echo form_submit('Submit', 'Toevoegen aan database', 'class="white radius nice button"'); ?> 
							</tr> 
		  					
		  				</li>
					</ul>
			</div>	
		</div>
		
	</div>
	<!-- container -->




	<!-- Included JS Files -->
	<script src="<?php echo base_url(); ?>template/javascripts/foundation.js"></script>
	<script src="<?php echo base_url(); ?>template/javascripts/app.js"></script>
	<script src="<?php echo base_url(); ?>javascripts/jquery.roundabout.min.js"></script> 

</body>
</html>
